import request from '@/utils/request'

// 查询规则列表
export function listRules(query) {
  return request({
    url: '/system/rules/lists',
    method: 'get',
    params: query
  })
}

// 查询规则详细
export function getRules(ruleId) {
  return request({
    url: '/system/rules/' + ruleId,
    method: 'get'
  })
}

// 新增规则
export function addRules(data) {
  return request({
    url: '/system/rules',
    method: 'post',
    data: data
  })
}

// 修改规则
export function updateRules(data) {
  return request({
    url: '/system/rules/update',
    method: 'post',
    data: data
  })
}

// 删除规则
export function delRules(ruleId) {
  return request({
    url: '/system/rules/delete/' + ruleId,
    method: 'post'
  })
}
